package com.jiedeng.dao;

import com.jiedeng.model.CheckItem;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @author 覃远龙
 * @ClassName: ICheckItemRepository
 * @Description:
 * @date 2017/4/25 16:44
 */
public interface ICheckItemRepository extends JpaRepository<CheckItem, Long>, JpaSpecificationExecutor<CheckItem> {

    List<CheckItem> findAll(Specification<CheckItem> specification);

    Page<CheckItem> findAll(Specification<CheckItem> specification, Pageable page);

    List<CheckItem> findByPropId(int propId);

    List<CheckItem> findByPeriodIdAndIsVisible(long period,boolean isVisible);
    List<CheckItem> findByPeriodIdAndIsVisibleAndPropId(long period,boolean isVisible,int propId);


}
